{% extends "CommonLibraryBundle::base.html.twig" %}

{% block stylesheets %}
    {{ parent() }}
    <link type="text/css" rel="stylesheet" href="{{asset("js/dataTable/DataTables-1.10.0/media/css/jquery.dataTables.css")}}" />
    <link type="text/css" rel="stylesheet" href="{{ asset("css/evaluation.css") }}"/>
{% endblock %}

{% block javascripts %}
    {{parent()}}
    <script type="text/javascript" src="{{ asset("js/dataTable/DataTables-1.10.0/media/js/jquery.dataTables.js") }}"></script>{% endblock %}

{% block titre %}
    Evaluation
{% endblock %}

{% block titresmall %}
    Toutes les évaluations
{% endblock %}

{% block notif %}
    {% include '::notif.html.twig' %}
{% endblock %}

{% block subbody %}


    <div id="divGestionEvaluation">
        <a href="{{ path('common_library_evaluation_edit') }}" class="btn btn-mini btn-ajout btn-primary pull-right"><span class="glyphicon glyphicon-plus"></span> Ajouter une évaluation</a><br/><br/>
        <table id="tableauEvaluations" class="display table table-violet table-bordered table-striped table-responsive table-hover">
            <thead>
            <tr>
                <th>Tranche inférieure</th>
                <th>Tranche supérieure</th>
                <th>Description</th>
                <th></th>
                <th></th>
            </tr>
            </thead>
            <tbody>
            {% for evaluation in evaluations %}
                <tr>
                    <td>{{ evaluation.trancheInf }}</td>
                    <td>{{ evaluation.trancheSup }}</td>
                    <td>{{ evaluation.description }}</td>
                    <td style="text-align:center;"><a href="{{ path('common_library_evaluation_edit_1', {'idEvaluation': evaluation.id}) }}"><button class="btn btn-info btn-sm"><i class="glyphicon glyphicon-edit"></i></button></a></td>
                    <td style="text-align:center;"><a href="{{ path('common_library_evaluation_delete', {'idEvaluation': evaluation.id}) }}" onclick="return confirm('Etes-vous sûr(e) de vouloir supprimer cette evaluation ?')"><button class="btn btn-danger btn-sm"><i class="glyphicon glyphicon-remove"></i></button></a></td>
                </tr>
            {% endfor %}
            </tbody>
        </table>
    </div>

{% endblock %}